package com.corpcredit.webapp.action;

import java.io.Serializable;
import java.util.List;

import com.corpcredit.webapp.action.BasePage;
import com.corpcredit.model.Company;
import com.corpcredit.service.GenericManager;

public class CompanyList extends BasePage implements Serializable {
    private GenericManager<Company, Long> companyManager;

    public void setCompanyManager(GenericManager<Company, Long> companyManager) {
        this.companyManager = companyManager;
    }

    public CompanyList() {
        setSortColumn("companyId"); // sets the default sort column
    }

    public List getCompanies() {
        return sort(companyManager.getAll());
    }
}

